<template>
  <div class="LoginAndEgistration">
    <!-- 返回导航栏 -->
    <van-nav-bar
      left-arrow
      @click-left="ReturnHome"
      right-text="密码登录"
      :border="false"
      @click-right="onClickRight"
    />
    <iphone-login></iphone-login>
    <!-- 密码登录 -->
    <van-popup
      v-model="Loginshow"
      position="right"
      closeable
      close-icon-position="top-left"
      :style="{ width: '100%', height: '100%' }"
    >
      <pwd-login :toPath="toPath"></pwd-login>
    </van-popup>
    <!-- 路由跳转登录或者注册 -->
  </div>
</template>

<script>
import IphoneLogin from "@/components/LoginView/IphoneLogin.vue";
import PwdLogin from "@/components/LoginView/PwdLogin.vue";
export default {
  name: "LoginAndEgistration",
  components: {
    IphoneLogin,
    PwdLogin,
  },
  data() {
    return {
      activeName: "a",
      //显示隐藏密码登录
      Loginshow: false,
      toPath: "",
    };
  },
  activated() {
    this.toPath = this.$route.query.netxUrl;
    // console.log("获取一些", this.$route);
  },
  methods: {
    // 返回首页
    ReturnHome() {
      // console.log(111);
      this.$router.push("/");
    },
    // 密码登录插槽
    onClickRight() {
      this.Loginshow = true;
    },
  },
};
</script>

<style lang="scss" >
.LoginAndEgistration {
  .van-nav-bar {
    background-color: transparent;
    .van-nav-bar__left {
      .van-icon {
        color: black;
      }
    }
    .van-nav-bar__text {
      color: #c8b37c;
    }
  }
}
</style>